﻿using System;
using System.Collections.Generic;
using ProjScan.Modules;
using ProjScan.Tools;
using UnityEditor;
using UnityEngine;

namespace ProjScan
{
	// Token: 0x0200015A RID: 346
	public class ScanMain
	{
		// Token: 0x06000C62 RID: 3170 RVA: 0x00036460 File Offset: 0x00034660
		public static void Run_Selected_Modules()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Selected_Modules");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C63 RID: 3171 RVA: 0x000364B0 File Offset: 0x000346B0
		public static void Run_Basic_Assets_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				Debug.Log("RunBasicAssetsCheck");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Basic_Assets_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C64 RID: 3172 RVA: 0x0003657C File Offset: 0x0003477C
		public static void Run_Scenes_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Scenes_Check");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Scenes_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C65 RID: 3173 RVA: 0x0003664C File Offset: 0x0003484C
		public static void Run_Global_Settings_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Global_Settings_Check");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Global_Settings_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C66 RID: 3174 RVA: 0x0003671C File Offset: 0x0003491C
		public static void Run_CS_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_CS_Check");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "CS_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C67 RID: 3175 RVA: 0x000367EC File Offset: 0x000349EC
		public static void Run_Custom_Rules_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Custom_Rules_Check");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Custom_Rules_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C68 RID: 3176 RVA: 0x000368BC File Offset: 0x00034ABC
		public static void Run_Effects_Play_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Effects_Play_Check");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Effects_Play_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C69 RID: 3177 RVA: 0x0003698C File Offset: 0x00034B8C
		public static void Run_Shader_Analysis()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Shader_Analysis");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Shader_Analysis";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C6A RID: 3178 RVA: 0x00036A5C File Offset: 0x00034C5C
		public static void Run_Art_Assets_Check()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run_Art_Assets_Check");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string text in list)
				{
					bool flag2 = text == "Art_Assets_Check";
					if (flag2)
					{
						ScanMain.modulesToRun[text] = true;
					}
					else
					{
						ScanMain.modulesToRun[text] = false;
					}
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C6B RID: 3179 RVA: 0x00036B2C File Offset: 0x00034D2C
		public static void RunAll()
		{
			bool flag = Singleton<ModulesManager>.Instance.CheckIsCanRun();
			if (flag)
			{
				ScanLog.Instance.LogInfo(Module.Manager, "Run All");
				ScanMain.modulesToRun = Singleton<ModulesManager>.Instance.GetScanModules();
				List<string> list = new List<string>(ScanMain.modulesToRun.Keys);
				foreach (string key in list)
				{
					ScanMain.modulesToRun[key] = true;
				}
				Singleton<ModulesManager>.Instance.Run(ScanMain.modulesToRun);
			}
		}

		// Token: 0x06000C6C RID: 3180 RVA: 0x00006688 File Offset: 0x00004888
		public static void DoTest()
		{
			Singleton<SettingsHelper>.Instance.ModifyProjectSettings();
			ScanLog.UnityLog(string.Format("扫描开始，当前激活的目标平台为：{0}", EditorUserBuildSettings.activeBuildTarget));
			ScanMain.RunAll();
		}

		// Token: 0x04000794 RID: 1940
		private static Dictionary<string, bool> modulesToRun;
	}
}
